home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Dev / gui / Feelin040718.readme < prev   
Text File  |  2004-09-23  |  22KB  |  453 lines

  1. Short:    20040718 NEW Object-oriented System & GUI
  2. Author:   Olivier LAVIALE - gofromiel@numericable.fr
  3. Uploader: gofromiel@numericable.fr
  4. Type:     dev/gui
  5.  
  6.     After an Intuition comes a Feelin.
  7.  
  8. -- FEELIN -------------------------------------------------------------------
  9.  
  10.     Feelin is a new object-oriented system (OOS)  with  an  object-oriented
  11.     GUI  (OOG).  The  OOG  is only one of the many applicability of Feelin.
  12.     Feelin as been written from scratch with a simple goal: be the smallest
  13.     (the  core  library  is  only  23  ko  !!),  the  fastest, the securest
  14.     (crash-free object invokation, bullet-proof memory management) and  the
  15.     more  open  object-oriented system on Amiga. IMHO, I think I've succeed
  16.     :-)
  17.  
  18.     Feelin features its very own object and class handling,  its  very  own
  19.     bullet-proof  memory  management  system, and many new concepts such as
  20.     Dynamic IDs,  preferences,  servers,  bugs  loggin,  crash-free  object
  21.     invokation...  My  goal,  creating  Feelin, was to offer a free, simple
  22.     (yet powerful) and secure OOS that can evolves on its own.
  23.  
  24.     Feelin  is  completely  expandable  by  adding  external  libraries  or
  25.     writting  custom classes within your programs. Anybody can add features
  26.     (classes) to Feelin without asking me  for  a  registration  number  or
  27.     anything  like  that.  Using Dynamic IDs was a significant step in that
  28.     direction, and I do my best to keep Feelin very Dynamic.  For  example,
  29.     only very low-level classes are built into the library, all classes are
  30.     external and loaded on the fly when needed. Plus, I  don't  use  hidden
  31.     features  or structures, all classes are opaque. Anyone can rewrite any
  32.     class, there won't be any problem.
  33.  
  34.     
  35.     Feelin is also a complete and independant system to create and maintain
  36.     graphical user interfaces. The GUI part is similar to MUI, but does not
  37.     use BOOPSI, GadTools, not even  intuition  gadgets.  All  classes  were
  38.     written  from  scratch.  As  MUI,  every  pixel  of  the application is
  39.     configurable (even windows look and color scheme)...
  40.  
  41.  
  42. -- EXAMPLES -----------------------------------------------------------------
  43.  
  44.     Examples are written in C and E. Executable are also supplied. Examples
  45.     are  mainly  used for testing. But there are also some tutorials on how
  46.     to write custom classes and so.
  47.  
  48.     Class sources included in this release
  49.     --------------------------------------
  50.  
  51.     * FC_Dataspace: This is a system example. Datatype objects are used  to
  52.     store all kinds of data. Simple but efficient.
  53.  
  54.     * FC_Bar, FC_Gauge: These are subclasses of FC_Area, they are basic GUI
  55.     elements.
  56.  
  57.     *  FC_Text:  A  simple  GUI  element,  but  shows  how   to   use   the
  58.     FC_TextDisplay support class.
  59.  
  60.     * FC_PreviewColor, FC_PopColor and FC_AdjustColor:  These  classes  are
  61.     used  to  display a color, pop a window to adjust the color, and adjust
  62.     the color. These classes are the basis of the Preview/Pop/Adjust  trio,
  63.     which  includes Frames, ColorScheme, Image... They also show how tu use
  64.     the automatic localization support of F_CreateClassA().
  65.  
  66.     * FC_Decorator and FC_Shade: FC_Decorator is a simple class showing how
  67.     to  write  a preference object. FC_Shade is a rather complex class used
  68.     to decorate windows (used instead of Intuition window's border).
  69.  
  70.  
  71. -- HISTORY ------------------------------------------------------------------
  72.  
  73.     CHANGES SINCE RELEASE 030513 - SHORT
  74.  
  75.     FC_Object and FC_Notify merged. FC_Object local data is now opaque. All
  76.     subclasses  have  been  modified,  especialy FC_Area because it was now
  77.     impossible to use macros to 'peek' values. FC_Area subclasses must  use
  78.     the  FA_AreaData  attribute  to  obtain  the public part of the FC_Area
  79.     local object data. FC_Area is finaly free from FC_Object. Both  classes
  80.     can evolve freely.
  81.  
  82.     FC_FrameDisplay and  FC_ImageDisplay  are  now  both  using  string  as
  83.     specification.  More over, two specification can be defined in a single
  84.     string by separating them with a comma. Thus, FA_AltFrame,  FA_AltBack,
  85.     FA_Image_Render and FA_Image_Select are now obsolete. Using strings was
  86.     a significant step forward, preferences definitions are now  must  more
  87.     easy, and leave space for further changes and enhancement.
  88.  
  89.     The preference editor is finaly a beautiful reality  :-)  Many  classes
  90.     have  been  created  for  the occasion, and many improvements have been
  91.     made to the whole system. The new  classes  born  with  the  preference
  92.     editor    are   :   FC_AdjustColor,   FC_AdjustFrame,   FC_AdjustImage,
  93.     FC_AdjustScheme,    FC_AdjustSpacing,     FC_PopColor,     FC_PopFrame,
  94.     FC_PopImage,    FC_PopScheme,    FC_PreferenceGroup,   FC_PreviewColor,
  95.     FC_PreviewFrame and FC_PreviewScheme.
  96.  
  97.     Most classes have been update and feature a preference group.
  98.  
  99.     The FCC_Query() function have been expanded to support  the  preference
  100.     system.  The  function  can be queried to return a tag list to create a
  101.     general class, or a tag list to create a preference class,  this  class
  102.     will  then  be  used to create a preference group object. Thus, a class
  103.     can define both an object, and a preference  group  to  customize  this
  104.     object.
  105.  
  106.     FC_TextDisplay has been completely  rewritten.  Text  is  now  formated
  107.     using  HTML  markups.  Text  can  be formated like HTML pages. Yet, few
  108.     commands are implemented. <i>, <b>, <u> can be used to change the style
  109.     of  the  font to, respectively, italic, bold and undelined. Text can be
  110.     aligned to the left, to the right, centered or even justified with  the
  111.     command  <align>.  The  command <font> can be used to change the font's
  112.     face, font's colour and font's size. The command <br> can  be  used  to
  113.     break lines (as well as the common \n). An customizable horizontal rule
  114.     can be used to divided parts of a text with the  command  <hr>.  Images
  115.     can also be incorporated within the text with the command <img>...
  116.  
  117.  
  118.     CHANGES SINCE RELEASE 030513 - COMPLETE
  119.  
  120.  
  121.     -- FC_Object (03.00) --------------------------------------------------
  122.  
  123.     Class has been rewritten. FC_Notify is now included in the  class.  The
  124.     LocalObjectData  is  now opaque. The struct FeelinNode, formaly used to
  125.     link objects in  a  FeelinList,  has  been  removed.  Sub-classes  must
  126.     implement their own linking system, which can have any form.
  127.  
  128.     The FM_AddMember and FM_RemMember methods are no  longer  synonymus  of
  129.     FM_Family_AddTail  and  FM_Family_Remove.  They are now generic methods
  130.     defined by FC_Object (instead of FC_Family). They can be used to add or
  131.     remove  object  to  or from a parent even if he doesn't use a FC_Family
  132.     object. The linking implementation is now totaly free (this is the case
  133.     of the FC_Group v8.00).
  134.  
  135.     More    over    FM_AddMember    now     replaces     FM_Family_AddHead,
  136.     FM_Family_AddTail and FM_Family_Insert, thanks to a little extension:
  137.  
  138.       F_Do(Obj,FM_AddMember,new,FV_AddMember_Head);
  139.       F_Do(Obj,FM_AddMember,new,FV_AddMember_Tail);
  140.       F_Do(Obj,FM_AddMember,new,FV_AddMember_Insert,prev);
  141.  
  142.  
  143.     -- FC_Family (03.00) --------------------------------------------------
  144.  
  145.     Completely  rewritten.  Supports  FM_AddMember  and   FM_RemMember   of
  146.     FC_Object v3.00
  147.  
  148.     Objects are no longer linked by FC_Family, instead they are  referenced
  149.     in  linked  nodes.  Thus,  any  type  of object can now be added to the
  150.     family.
  151.  
  152.  
  153.     -- FC_Application (08.00) ---------------------------------------------
  154.  
  155.     Nest count for the attribute FA_Application_Sleep. The  application  is
  156.     only  opened  when  the  counter  is equal to zero. Both TRUE and FALSE
  157.     value are nested (the counter is a LONG), thus, starting from zero,  if
  158.     the  attribute has been set to FALSE twice it must be set to TRUE three
  159.     time for the application to sleep (zero = application awake).
  160.  
  161.     It is  sometime  difficult  to  know  the  state  of  the  application,
  162.     especially  when you push method (FM_Application_Sleep) and you need to
  163.     wait  for  the  application  to   really   be   put   to   sleep.   The
  164.     FA_Application_State  attribute  has  been  created  for  this purpose.
  165.     Currently  only  two  states  are  defined   FV_Application_Sleep   and
  166.     FV_Application_Awake.  [???] In the future the returned value will be a
  167.     pattern of 16 bits plus a word describing the last important state.
  168.  
  169.     Added preference support
  170.  
  171.     Preferences are only loaded at the begining of  the  FM_Application_Run
  172.     method.  Update  of the preferences takes place when the application if
  173.     awake, the preferences are not update  (FM_Preference_Read),  they  are
  174.     read  as is. This will be easier to update application this way, as the
  175.     preference object is already up to date and do not need anything more.
  176.  
  177.     There was an very old bug  in  FM_Application_OpenFont.  The  fallbacks
  178.     were  not  really good, if font spec was FV_Font_Inherit and the parent
  179.     have no font, FV_Font_Inherit was used as a string, the  font  name  to
  180.     open.
  181.  
  182.  
  183.     -- app.server (02.00) -------------------------------------------------
  184.  
  185.     The server is no longer included in the FC_Application class to  follow
  186.     new class rules.
  187.  
  188.     Drag'n'Drop support
  189.  
  190.  
  191.     -- FC_Display (03.00) -------------------------------------------------
  192.  
  193.     display.server has been removed. The design was terrible,  and  it  was
  194.     useless  anyway,  because  currently no screen can be created. I'll see
  195.     later for public screen management. Anyway the server must be separated
  196.     from the FC_Display (e.i. knowing nothing about internal management).
  197.  
  198.     FC_Display handles  all  FC_DisplayContext  methods  :  FM_CreateColor,
  199.     FM_DeleteColor,   FM_CreateColorScheme  and  FM_DeleteColorScheme.  The
  200.     FM_CreateColor method has been modified a little and requires a  scheme
  201.     reference.  This  scheme  is  used  as  a  reference  to create the pen
  202.     (currently only used for "s:"). Color schemes  can  now  be  inherited,
  203.     just  like fonts are backgrounds.
  204.  
  205.     FC_DisplayContext is now obsolete.
  206.  
  207.     To create a Display the FM_Display_Create method must be invoked on the
  208.     class  using  F_ClassDoA(). If a suitable display is found, the display
  209.     is shared. Otherwise, a new display is created (not functionnal yet).
  210.  
  211.     To delete a Display the FM_Display_Delete method must be invoked on the
  212.     class  using F_ClassDoA(). If the display is no longer used, the object
  213.     is disposed.
  214.  
  215.     Only application should create and delete displays.
  216.  
  217.  
  218.     -- FC_Area (05.00) ----------------------------------------------------
  219.  
  220.     FC_Area is now totaly independant from FC_Object, kludges are no longer
  221.     used to access area data. The FA_AreaData attribute must now be used to
  222.     get a pointer to a  FAreaData  structure  holding  public  information.
  223.     FAreaData incorporates 'Parent', 'Next' and 'Prev' fields, a new way to
  224.     link FC_Area object was need.
  225.  
  226.     Complete Drag'n'Drop (DnD) support.
  227.  
  228.     When the FA_Selected  attribute  changes,  new  inner  coordinates  are
  229.     computed  and  the  FM_Layout method is invoked on the object to update
  230.     its layout (usefull for FC_Group sub classes like FC_Cycle).
  231.  
  232.     FA_SetMin  &  FA_SetMax  are  for  subclasses  use.  These   attributes
  233.     indicates  wheter  the object minimal and maximal with and height shall
  234.     be calculated to fit the object contents. They both have special values
  235.     e.g.  FV_SetMin (TRUE) indicate that minimal dimensions shall be set on
  236.     FM_AskMinMax. FV_SetVMax indicate that only vertical maximum  shall  be
  237.     set.   FV_NoSetMin  clears  FF_Area_SetHMin  and  FF_Area_SetVMin.  The
  238.     attributes FA_FixedWidth, FA_FixedHeight and FA_Fixed are now obsolete,
  239.     as  their  flag  representation  FF_Area_FixedW and FF_Area_FixedH. The
  240.     attributes FA_SetMin and FA_SetMax must be used  instead.  FM_AskMinMax
  241.     have been updated.
  242.  
  243.     Shortcuts are case insensitive now.
  244.  
  245.     The font of the object can now be modified at any  time,  changes  will
  246.     occurs dynamically, thanks to the new FM_RethinkLayout.
  247.  
  248.  
  249.     -- FC_Group (08.00) ---------------------------------------------------
  250.  
  251.     Preference editor support. Support new FC_Area  handling  (FA_AreaData)
  252.     for itself and its children.
  253.  
  254.     Methods applyed on the object are no longer applyed  to  the  children.
  255.     This is unusual for a group but methods handling is too obscure because
  256.     I must know which method must be forwarded or not  to  children.  If  a
  257.     method   must   also   be   applied   to   children   use   the  method
  258.     FM_Group_Forward.
  259.  
  260.     This method should be used to apply a method on a FC_Group  object  AND
  261.     its children. The method uses the new FF_AREA_GROUP flag to distinguish
  262.     groups from other  objects.  If  the  object  is  a  group  the  method
  263.     FM_Group_Forward  is  sent,  otherwise  the  method  to forward is sent
  264.     instead.
  265.  
  266.     The 2D minmax calculation was a bit buggy, when calculating the  height
  267.     of  the  rows, only the first rows was processed (each row was equal to
  268.     the first one).
  269.  
  270.  
  271.     -- FC_FrameDisplay (03.00) --------------------------------------------
  272.  
  273.     Frame specifications are now strings  (like  ImageDisplay).  This  will
  274.     leave space for future expansion (external code...). FA_AltFrame is now
  275.     deprecated, if you want to use alternate image you MUST  use  a  string
  276.     spec.
  277.  
  278.       0:xx.blbtbrbb              // One frame
  279.       0:xx.blbtbrbb,yy.blbtbrbb  // Two frame
  280.  
  281.     Frames organisation (numbering) changed. 7 frames added.
  282.  
  283.  
  284.     -- FC_ImageDisplay (03.00) --------------------------------------------
  285.  
  286.     Is now a subclass of FC_Object and uses static IDs.
  287.  
  288.     FC_ImageDisplay uses the same mecanism  as  FC_FrameDisplay  to  create
  289.     images  (simple  or  double).  Numeric  values  like FI_Shine are still
  290.     supported, but only to create simple images. If you want  to  create  a
  291.     double   image   you   must  use  a  string  and  seperate  each  image
  292.     specification with a comma :
  293.  
  294.       FI_Shine          >>> color scheme Shine
  295.       "s:1"             >>> Same as above
  296.       "s:1,c:FF0000"    >>> Same as above, full red as selected
  297.  
  298.     FA_ImageDisplay_Spec   replaces   both    FA_ImageDisplay_Render    and
  299.     FA_ImageDisplay_Select, which are now obsolete.
  300.  
  301.     The image can now be modified at  any  time,  you  no  longer  need  to
  302.     dispose  and  create  another  object  if you want to modify the image,
  303.     everything is handled internally (the object keeps a reference  of  the
  304.     FC_Render object for this magic to happen).
  305.  
  306.     Support intuition pens again.
  307.  
  308.     -- FC_PopHelp (02.00) -------------------------------------------------
  309.  
  310.     Bubble's arrow can be on any corner of the bubble,  depending  bubble's
  311.     position  in  the  screen  (mouse's  position actually). Thus, bubble's
  312.     arrow is less disabled, only when really needed.
  313.  
  314.     Bubble's shadow has been removed from now because I need more tools  to
  315.     create the shadow (maybe blits...)...
  316.  
  317.     The drawing of the bubble is simpler now. I don't  use  graphic.library
  318.     functions to draw the corners and the arrow, but arrays of chunky CLUT,
  319.     rendered with bubble's scheme, saving a lot of code and work.
  320.  
  321.  
  322.     -- FC_Preference (02.00) ----------------------------------------------
  323.  
  324.     The global object is not included in the ClassUserData. This is a  fake
  325.     object, not created by the class but similar.
  326.  
  327.     Handling of preference names. Each application can now  have  its  very
  328.     own preference file.
  329.  
  330.     The method FM_Preference_Read can now read a file defined by a name  or
  331.     resolve     values     FV_Preference_ENV    or    FV_Preference_ENVARC.
  332.     FM_Preference_Write follow the same rules but can also write both ENV a
  333.     ENVARC width the special value FV_Preference_BOTH.
  334.  
  335.  
  336.     -- FC_PreferenceEditor (02.00) ----------------------------------------
  337.  
  338.     PreferenceGroup list is built on class init. This avoid  each  instance
  339.     to  build  a new list or to check a previous list. A "fast access list"
  340.     is also created in "ENV:Feelin/CLS_PREFERENCEEDITOR_FASTLIST" with  all
  341.     classes  successfully  opened. If the list is exists it is read instead
  342.     of checking every single library.
  343.  
  344.     All preference work is done on the application's preference  object  or
  345.     on     the     global    preference    object    if    the    attribute
  346.     FA_PreferenceEditor_Global is TRUE. Modifications are  saved  with  the
  347.     FM_PE_Save   method   or   used  with  the  FM_PE_Use  method.  If  the
  348.     FM_PE_Cancel method is invoked on the object  (either  by  closing  the
  349.     window or by pressing the cancel gadget) preferences are read back from
  350.     ENV: and set directly into the preference object.
  351.  
  352.     This behaviour  involve  very  few  dos  notification,  because  almost
  353.     everything is handled internally.
  354.  
  355.     This version is finally kickin'. Instead of  showing/hidding  groups  I
  356.     add/remove them dynamically it is absolutely faster. I also use the new
  357.     methods FM_Group_InitChange and  FM_Group_ExitChange.  They  do  little
  358.     things actually... but it works ;-)
  359.  
  360.  
  361.     -- FC_Render (02.00) --------------------------------------------------
  362.  
  363.     The clipping system has been totaly rewritten. Clippings were  relative
  364.     to  the object e.i. clipping knowledge was restricted to objects, which
  365.     is quiet stupid.
  366.  
  367.     Now, clipping are relative to the layer where they are installed.  Each
  368.     clip  region  installed  (struct  FeelinTraceClip) is linked to a layer
  369.     node (stuct FeelinTraceLayer), which is linked to the CUD. Clip regions
  370.     installed  on  a layer are all linked to the same list. Thus, different
  371.     FC_Render objects can install and remove clip region without conflict.
  372.  
  373.  
  374.     -- FC_Shade (03.10) ---------------------------------------------------
  375.  
  376.     All gadgets rendering are now buffered (if possible), and not only  the
  377.     title bar. The FC_TextDisplay object used by the title bar is no longer
  378.     created on the fly when the title bar need to be drawn, but  create  on
  379.     FM_Setup.  The  preparse  string are now resolved with preference items
  380.     "FP_Decorator_PreParse" & "FP_Decorator_AltPreParse".
  381.  
  382.  
  383.     -- FC_TextDisplay (04.00) ---------------------------------------------
  384.  
  385.     The class has been completely rewritten. Text  is  now  formated  using
  386.     HTML markups.
  387.  
  388.     Text  can  be  formated  like  HTML  pages.  Yet,  few   commands   are
  389.     implemented.  <i>, <b>, <u> can be used to change the style of the font
  390.     to, respectively, italic, bold and undelined. Text can  be  aligned  to
  391.     the  left,  to  the  right, centered or even justified with the command
  392.     <align>. The command <font> can be used  to  change  the  font's  face,
  393.     font's  colour  and  font's size. The command <br> can be used to break
  394.     lines (as well as the common \n). An customizable horizontal  rule  can
  395.     be  used  to  divided parts of a text with the command <hr>. Images can
  396.     also be incorporated within the text with the command <img>.
  397.  
  398.     In addition to standard HTML commands, some command have been added  to
  399.     allow  further  customization  of  the  text aspect. The command <pens>
  400.     allows management of 4 additionnal pens used to produce effects such as
  401.     emboss,  ghost, glow... The command <spacing> can be used to modify the
  402.     spacing (in pixels) between two or several lines.
  403.  
  404.  
  405.     -- FC_Window (08.00) --------------------------------------------------
  406.  
  407.     Added preference support with localization.
  408.  
  409.     Internal attributes handling totaly rewritten, especially  gadgets  and
  410.     system  attributes  (FA_Window_Active...).  The  code  is  cleaner  and
  411.     shorter. The LocalObjectData is also smaller. I've finally get  rid  of
  412.     the embended struct NewWindow.
  413.  
  414.     FA_Window_Open is a wish (reflected by FF_WINDOW_SYS_OPENREQUEST).  The
  415.     attribute  can  be set to TRUE on object's creation time without really
  416.     opening the window, but the wish is recorder. The window is  opened  as
  417.     soon   as  possible  by  the  application  (or  the  object  itself  if
  418.     requirements are met). To know if a window is currently opened use  the
  419.     FA_Window  attribute,  it  returns a pointer to the intuition window of
  420.     the object.
  421.  
  422.     Zoom and Size gadgets cannot be requested. These gadgets only appear if
  423.     a  window can be resized. The FA_Window_Resizable attribute can be used
  424.     by decorators to know if a window can be rezised (to  create  zoom  and
  425.     size gadgets). The flag FF_WINDOW_SYS_RESIZABLE is set when a window is
  426.     resizabel, cleared otherwise.
  427.  
  428.     The FM_BuildContextHelp method is also sent to the decorator now.
  429.  
  430.  
  431.     -- DOSNotify (02.00) --------------------------------------------------
  432.  
  433.     Instead of using an external server (DOSNotifyServer), the class create
  434.     a  thread  (process)  that  is highly more convenient, everything stays
  435.     internal.
  436.  
  437.  
  438.     -- NEW CLASSES --------------------------------------------------------
  439.  
  440.     FC_Cycle, FC_Radio, FC_Scale.
  441.  
  442.  
  443. -- LAST WORDS ---------------------------------------------------------------
  444.  
  445.     This was big work for me little programmer. I hope you'll like  it  and
  446.     wanna join me. I hope some comments. Thanks again and never forget :
  447.  
  448.                      Don't be tempted by the shinny appel
  449.                         Don't you eat of a bitter fruit
  450.                        Hunger only for a word of justice
  451.                         Hunger only for a word of truth
  452.                      'Cause all that you have is your sool
  453.